import random

answer = random.randint(1, 100)
continue_loop = True  # 持续循环（记录循环结束）
count = 0

while continue_loop:
    count += 1
    user_guess = int(input('输入你猜的数字：'))
    if user_guess == answer:
        print(F'猜对了✌👉你猜了{count}次')
        continue_loop = False
    elif user_guess > answer:
        print('猜大了')
    else:
        print('猜小了')
